/*
 * @Description:
 * @Author: fhw
 * @Date: 2022-08-06 13:48:11
 */
import { Module } from '@nestjs/common'
import { ChatUserService } from './chat_user.service'
import { ChatUserController } from './chat_user.controller'
import { TypeOrmModule } from '@nestjs/typeorm'
import { ChatUser } from './entities/chat_user.entity'
import { ChatUserFriend } from '../chat_user_friends/entities/chat_user_friend.entity'
import { GroupChat } from '../group-chat/entities/group-chat.entity'
import { jwtConstants } from 'src/modules/auth/constants'
import { JwtModule } from '@nestjs/jwt';
import { PassportModule } from '@nestjs/passport';
import { JwtStrategy } from 'src/modules/auth/jwt.strategy'
import { LocalStrategy } from 'src/modules/auth/local.strategy'
@Module({
  imports: [
    TypeOrmModule.forFeature([ChatUser, ChatUserFriend, GroupChat]),
    PassportModule,
    JwtModule.register({
      secret: jwtConstants.secret,
      signOptions: { expiresIn: '12h' },
    })
  ],
  controllers: [ChatUserController],
  providers: [ChatUserService, LocalStrategy, JwtStrategy],
  exports: [ChatUserService],
})
export class ChatUserModule { }
